import ThemedImage from "@theme/ThemedImage";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Network Interfaces

A container can expose multiple ports, each of them allowing a unique set of traffic. To expose these ports into Kubernetes, a Network Interface must be created - one per port.

The Network Interface allows for configuring additional behavior, such as if the network should be publicly available through Routes and liveness and readiness checks.

<Tabs>
  <TabItem value="dashboard" label="Dashboard">
    <ThemedImage
      alt="Configure Network interfaces Dashboard"
      customProps={{
        zoom: true,
      }}
      sources={{
        light: "/img/dashboard/platform/network/interface-and-healthchecks.png",
        dark: "/img/dashboard/platform/network/interface-and-healthchecks.png",
      }}
    />
  </TabItem>
</Tabs>

## Routes

To make the network interface publicly available, the interface must have a Route attached to it. A Route is simply an interface that specifies how the network interface should be exposed to the outside world
and can be implemented using [plugins](/operator-manual/setup-guide/operator/plugins). A default [Route-Plugin](/operator-manual/setup-guide/operator/networking) is provided, which exposes the interface using an Ingress.

To configure a _Route_ simply press `Add Host`, and specify the hostname that the interface should be exposed on.
Additionally one or more paths must be specified, which will be matched against incoming requests. These can either be exact, prefix or regexp matches.
Lastly, routes can have annotations, which in the case of the default Route-Plugin, translates into annotations on the Ingress resource.

<Tabs>
  <TabItem value="Host" label="Host">
    <ThemedImage
      alt="Configure Route Hosts"
      customProps={{
        zoom: true,
      }}
      sources={{
        light: "/img/dashboard/platform/network/edit-host.png",
        dark: "/img/dashboard/platform/network/edit-host.png",
      }}
    />
  </TabItem>
  <TabItem value="Paths" label="Paths">
    <ThemedImage
      alt="Configure Route Paths"
      customProps={{
        zoom: true,
      }}
      sources={{
        light: "/img/dashboard/platform/network/edit-path.png",
        dark: "/img/dashboard/platform/network/edit-path.png",
      }}
    />
  </TabItem>
</Tabs>

:::info Prerequisites
Make sure you have the [Route-Plugin](/operator-manual/setup-guide/operator/networking) configured in the operator.
:::